define (require, exports, module) ->
  {checkLogin, logOut} = require('mods/auth/auth_mid')

  return module.exports =
    [
      {
        # 首页
        path: '/'
        component: (resolve) ->
          require.async [ 'mods/home/home_mod'], resolve
          return
      }
      {
        # 产品列表
        path: '/product'
        component: (resolve) ->
          require.async [ 'mods/prod_list/prod_list_mod'], resolve
          return
      }
      {
        # 产品详情
        path: '/product/:id'
        name: 'prod_detail'
        component: (resolve) ->
          require.async [ 'mods/prod_detail/prod_detail_mod' ], resolve
          return
      }
      {
        # 产品搜索
        path: '/product_search/:q'
        name: 'prod_search'
        component: (resolve) ->
          require.async [ 'mods/prod_search/prod_search_mod' ], resolve
          return
      }
      {
        # 公告列表
        path: '/notice_list'
        component: (resolve) ->
          require.async [ 'mods/notice_list/notice_list_mod'], resolve
          return
      }
      {
        # 公告详情
        path: '/notice_detail/:type/:detail_id'
        name: 'notice_detail'
        component: (resolve) ->
          require.async [ 'mods/notice_detail/notice_detail_mod'], resolve
          return
        # beforeEnter: checkLogin
      }
      {
        # 公司动态
        path: '/gsdt'
        component: (resolve) ->
          require.async [ 'mods/gsdt/gsdt_mod'], resolve
          return
      }
      {
        # 公司动态-详情
        path: '/gsdt_detail/:gsdt_id'
        component: (resolve) ->
          require.async [ 'mods/gsdt_detail/gsdt_detail_mod'], resolve
          return
      }
      {
        # 人才招聘
        path: '/rczp'
        component: (resolve) ->
          require.async [ 'mods/about/rczp/rczp_mod'], resolve
          return
      }
      {
        # 人才招聘-详情
        path: '/rczp_detail/:rczp_id'
        component: (resolve) ->
          require.async [ 'mods/rczp_detail/rczp_detail_mod'], resolve
          return
      }
      {
        # 个人中心
        path: '/user_info'
        component: (resolve) ->
          require.async [ 'mods/info/info_mod'], resolve
          return
        beforeEnter: checkLogin
      }
      {
        # 个人中心-我的产品
        path: '/info_prod'
        component: (resolve) ->
          require.async [ 'mods/info_prod/info_prod_mod'], resolve
          return
        beforeEnter: checkLogin
      }
      {
        # 个人中心-订单管理
        path: '/info_order'
        component: (resolve) ->
          require.async [ 'mods/info_order/info_order_mod'], resolve
          return
        beforeEnter: checkLogin
      }
      {
        # 个人中心-定制产品
        path: '/custom_prod'
        component: (resolve) ->
          require.async [ 'mods/custom_prod/custom_prod_mod'], resolve
          return
        beforeEnter: checkLogin
      }
      {
        # 在线支付
        path: '/pay'
        component: (resolve) ->
          require.async [ 'mods/pay/pay_mod'], resolve
          return
        beforeEnter: checkLogin
      }
      {
        # 在线支付-提交订单
        path: '/pay/1'
        name: 'pay_submit_order'
        component: (resolve) ->
          require.async [ 'mods/pay/pay_one/pay_one_mod'], resolve
          return
        # beforeEnter: checkLogin
      }
      {
        # 在线支付-立即支付
        path: '/pay/2'
        name: 'pay_online'
        component: (resolve) ->
          require.async [ 'mods/pay/pay_two/pay_two_mod'], resolve
          return
        # beforeEnter: checkLogin
      }
      {
        # 在线支付-支付完成
        path: '/pay/3'
        component: (resolve) ->
          require.async [ 'mods/pay/pay_three/pay_three_mod'], resolve
          return
        # beforeEnter: checkLogin
      }
      {
        # 风险测评
        path: '/risk'
        component: (resolve) ->
          require.async [ 'mods/risk/risk_mod'], resolve
          return
        beforeEnter: checkLogin
      }
      {
        # 首页模块自定义
        path: '/zdymk_detail'
        name: "zdymk_detail"
        component: (resolve) ->
          require.async [ 'mods/zdymk_detail/zdymk_detail_mod'], resolve
          return
      }
      {
        # 关于我们 -- 公司介绍
        path: '/gsjs'
        name: "gsjs"
        component: (resolve) ->
          require.async [ 'mods/about/gsjs/gsjs_mod'], resolve
          return
      }
      {
        # 关于我们 -- 联系我们
        path: '/contact'
        name: "contact"
        component: (resolve) ->
          require.async [ 'mods/about/contact/contact_mod'], resolve
          return
      }
      {
        # 登录
        path: '/login'
        component: (resolve) ->
          require.async [ 'mods/login/login_mod'], resolve
          return
      }
      {
        # 注册
        path: '/reg'
        component: (resolve) ->
          require.async [ 'mods/reg/reg_mod'], resolve
          return
      }
      {
        # 退出登录
        path: '/logout'
        beforeEnter: logOut
      }
    ]